import time

from selenium.webdriver.common.by import By
from selenium import webdriver

from day5.common.Base import Base


class LoginPage(Base):
    def input_username(self, username):
        self.keys((By.CLASS_NAME, 'inputborder'), username)
        # self.find_element((By.CLASS_NAME, 'inputborder')).send.keys(username)

    #
    def password(self, password):
        self.keys(('name', 'password'), password)
    #     self.find_element(('name', 'password'))send.keys(password)


    def remember(self):
        self.click((By.CLASS_NAME, 'loginbtn'))
if __name__ == '__main__':
    loginpage = LoginPage('chrome')
    loginpage.get('https://ecshop.test2.shopex123.com/user.php')
    time.sleep(2)
    loginpage.input_username('zhuzhu11')
    loginpage.password('123456')
    loginpage.remember()
    loginpage.quit()





















